test: 增加可扩展的浏览器能力回归测试框架 - #150
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为什么增加这个测试框架
BrowserSkill 每次修改 CLI、daemon、扩展或插件后,都需要有一套稳定的测试基准,用来判断更新是否引入严重问题。
这个框架主要解决两个问题:
测试页面全部在本地运行,不依赖外部网站,避免页面更新、网络波动等因素影响结果。
当前包含 6 个基础能力 case 和 1 个 seed 驱动的动态页面 case,后续可以持续增加新的测试页面和历史 badcase。
现在vibecoding 比较方便,可以让AI帮忙把反馈case 增加入测试集,
主要改动
bsk,也支持通过 adapter 运行 DSH 或其他 Agent。后续如何扩充
新增普通 case 时,只需要增加:
不需要修改中央 switch。
用户反馈的 badcase 可以通过下面的命令生成回归模板:
pnpm eval:browser scaffold <case-id> --title "..." --source "issue-or-pr"当前覆盖
tabs.borrow、tabs.return、assist.request-help需要真人或真实用户标签页,保留为人工测试验证结果
pnpm eval:browser:checkcargo build -p bsk通过4,7,14:3/3 通过